package com.bdqn.xiangchuan.service.impl;



import com.bdqn.xiangchuan.base.Gcmc;
import com.bdqn.xiangchuan.dao.GcmcDao;
import com.bdqn.xiangchuan.service.GcmcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class GcmcServiceImpl implements GcmcService {
	@Autowired
	private GcmcDao gcmcDao;

	public List<Gcmc> getAll() {
		return gcmcDao.getAll();
	}

	public List<Gcmc> getGcmcsByKhId(int khmc_id) {
		return gcmcDao.getGcmcsByKhId(khmc_id);
	}

	public boolean add(Gcmc gcmc) {
		return gcmcDao.add(gcmc)>0;
	}

	public boolean update(Gcmc gcmc) {
		return gcmcDao.update(gcmc)>0;
	}

	public boolean delete(List<Integer> gcmc_ids) {	
		return gcmcDao.delete(gcmc_ids)>0;
	}

	public List<Gcmc> getGcmcByGcName(String gcmc_name) {		
		return gcmcDao.getGcmcByGcName(gcmc_name);
	}
	

}
